Skip to content

Conversation

@lnicola
Copy link
Member

@lnicola lnicola commented Nov 24, 2025

Subtree update of rust-analyzer to rust-lang/rust-analyzer@cf4b1fa.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost

A4-Tacks and others added 30 commits November 4, 2025 16:42
Supports:

- and <-> and_then
- then_some <-> then

Example
---
```rust
fn foo() {
    let foo = Some("foo");
    return foo.and$0(Some("bar"));
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn foo() {
    let foo = Some("foo");
    return foo.and_then(|| Some("bar"));
}
```
It cannot be exactly the same, because we have needs rustc doesn't have (namely, accurate enumeration of all methods, not just with a specific name, for completions etc., while rustc also needs a best-effort implementation for diagnostics) but it is closer than the previous impl.

In addition we rewrite the closely related handling of operator inference and impl collection.

This in turn necessitate changing some other parts of inference in order to retain behavior. As a result, the behavior more closely matches rustc and is also more correct.

This fixes 2 type mismatches on self (1 remains) and 4 diagnostics (1 remains), plus some unknown types.
This is required now that we send this clause to the solver.
Example
---
```rust
enum A { $0Foo(u32), Bar$0(i32) }
```

**Before this PR**

```rust
enum A { Foo(u32), Bar(i32) }

impl From<u32> for A {
    fn from(v: u32) -> Self {
        Self::Foo(v)
    }
}
```

**After this PR**

```rust
enum A { Foo(u32), Bar(i32) }

impl From<u32> for A {
    fn from(v: u32) -> Self {
        Self::Foo(v)
    }
}

impl From<i32> for A {
    fn from(v: i32) -> Self {
        Self::Bar(v)
    }
}
```
Example
---
```rust
mod std { pub mod fmt { pub trait Debug {} } }
fn main() {
    $0std::fmt::Debug;
    let x: std::fmt::Debug = std::fmt::Debug;
}
```

**Before this PR**

```rust
use std::fmt;

mod std { pub mod fmt { pub trait Debug {} } }
fn main() {
    fmt::Debug;
    let x: fmt::Debug = fmt::Debug;
}
```

**After this PR**

```rust
use std::fmt::Debug;

mod std { pub mod fmt { pub trait Debug {} } }
fn main() {
    Debug;
    let x: Debug = Debug;
}
```
Like `unsafe(no_mangle)`
Rowan's green nodes are super drop heavy and as lru eviction happens on cancellation this can block for quite some time, especially after cache priming
Example
---
```rust
#[no_mangle]
static lower_case: () = ();
```

**Before this PR**

```text
non_upper_case_globals
```

**After this PR**

No diagnostics
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 3.14.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@3.14.1...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [glob](https://github.com/isaacs/node-glob) from 11.0.1 to 11.1.0.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v11.0.1...v11.1.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 11.1.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…incorrect-case

Fix hit incorrect_case on no_mangle static items
fix: make visibility diagnostics for fields to correct location
Example
---
viewHir

```rust
fn main() {
    let r = &2;
    let _ = &mut (*r as i32)
}
```

**Before this PR**

```rust
fn main() {
    let r = &2;
    let _ = &mut *r as i32;
}
```

**After this PR**

```rust
fn main() {
    let r = &2;
    let _ = &mut (*r as i32);
}
```
…yarn/editors/code/glob-11.1.0

Bump glob from 11.0.1 to 11.1.0 in /editors/code
…yarn/editors/code/js-yaml-3.14.2

Bump js-yaml from 3.14.1 to 3.14.2 in /editors/code
Add `unsafe(…)` attribute completion
Aditya-PS-05 and others added 11 commits November 23, 2025 20:45
add semantic tokens for deprecated items
…targets-outside-pkg-root

fix: include all target types with paths outside package root
…nd-then

Fix not applicable on `and` for replace_method_eager_lazy
Example
---
```rust
fn main() { let _ = &raw $0 }
```

**Before this PR**

```text
fn main() fn()
bt u32     u32
kw const
kw const
kw crate::
...
```

**After this PR**

```text
fn main() fn()
bt u32     u32
kw const
kw crate::
...
```
Fix duplicate `const` complete after `raw`
add deprecated semantic token for extern crate shorthand
proc-macro-srv: Reimplement token trees via immutable trees
@rustbot
Copy link
Collaborator

rustbot commented Nov 24, 2025

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Nov 24, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 24, 2025

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

@rust-log-analyzer

This comment has been minimized.

@lnicola
Copy link
Member Author

lnicola commented Nov 24, 2025

@bors r+ p=1

@bors
Copy link
Collaborator

bors commented Nov 24, 2025

📌 Commit 87e4974 has been approved by lnicola

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 24, 2025
@bors
Copy link
Collaborator

bors commented Nov 24, 2025

⌛ Testing commit 87e4974 with merge b64df9d...

@bors
Copy link
Collaborator

bors commented Nov 24, 2025

☀️ Test successful - checks-actions
Approved by: lnicola
Pushing b64df9d to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 24, 2025
@bors bors merged commit b64df9d into rust-lang:main Nov 24, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 24, 2025
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 42ec52b (parent) -> b64df9d (this PR)

Test differences

Show 21 test diffs

Stage 0

  • server_impl::rust_analyzer_span::tests::test_ra_server_from_str: pass -> [missing] (J0)
  • server_impl::rust_analyzer_span::tests::test_ra_server_to_string: pass -> [missing] (J0)
  • server_impl::token_id::tests::test_ra_server_from_str: pass -> [missing] (J0)
  • server_impl::token_id::tests::test_ra_server_to_string: pass -> [missing] (J0)
  • tests::test_broken_input_mismatched_delim: [missing] -> pass (J0)
  • tests::test_broken_input_unclosed_delim: [missing] -> pass (J0)
  • tests::test_broken_input_unknowm_token: [missing] -> pass (J0)
  • tests::test_broken_input_unopened_delim: [missing] -> pass (J0)
  • token_stream::tests::roundtrip: [missing] -> pass (J0)

Stage 1

  • server_impl::rust_analyzer_span::tests::test_ra_server_from_str: pass -> [missing] (J1)
  • server_impl::rust_analyzer_span::tests::test_ra_server_to_string: pass -> [missing] (J1)
  • server_impl::token_id::tests::test_ra_server_from_str: pass -> [missing] (J1)
  • server_impl::token_id::tests::test_ra_server_to_string: pass -> [missing] (J1)
  • tests::test_broken_input_mismatched_delim: [missing] -> pass (J1)
  • tests::test_broken_input_unclosed_delim: [missing] -> pass (J1)
  • tests::test_broken_input_unknowm_token: [missing] -> pass (J1)
  • tests::test_broken_input_unopened_delim: [missing] -> pass (J1)
  • token_stream::tests::roundtrip: [missing] -> pass (J1)

Additionally, 3 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard b64df9d1012f2482b54a4d959548cf8fc67e820c --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-x86_64-apple: 8118.1s -> 9342.1s (+15.1%)
  2. pr-check-1: 1961.8s -> 1686.8s (-14.0%)
  3. x86_64-gnu-llvm-20-3: 5821.2s -> 6573.8s (+12.9%)
  4. armhf-gnu: 5723.0s -> 5003.8s (-12.6%)
  5. i686-gnu-2: 6116.2s -> 5401.5s (-11.7%)
  6. dist-aarch64-apple: 8099.3s -> 7164.0s (-11.5%)
  7. x86_64-gnu-gcc: 3397.6s -> 3039.2s (-10.5%)
  8. x86_64-gnu-miri: 4804.8s -> 4341.2s (-9.6%)
  9. arm-android: 6235.0s -> 5651.1s (-9.4%)
  10. i686-gnu-1: 8116.2s -> 7356.8s (-9.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b64df9d): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.9% [-2.9%, -2.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.9% [-2.9%, -2.9%] 1

Cycles

Results (secondary 6.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
6.0% [6.0%, 6.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.0%, secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 21
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 22
All ❌✅ (primary) -0.0% [-0.1%, -0.0%] 21

Bootstrap: 471.257s -> 470.372s (-0.19%)
Artifact size: 388.26 MiB -> 388.20 MiB (-0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.